/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __CONFIG_H
#define __CONFIG_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/

/* Exported types ------------------------------------------------------------*/
typedef enum 
{
    IS_Idle,
    IS_Print,
    IS_WaitWiFi,
    IS_WaitMqtt,
    IS_WaitNext,
    IS_Sleep,
}Iot_Step;
typedef struct
{
    uint8_t isMqttConn;
    esp_mqtt_client_handle_t client;
    Iot_Step iotStep;
    float temperature;
    float humidity;
    bool isWifiConn;
    bool isSensorReady;
    uint8_t isSleepMode;

    // temp info
    uint32_t waitNextTimer;
}MyIot;

extern MyIot myIot;
/* Exported constants --------------------------------------------------------*/

/* Exported macro ------------------------------------------------------------*/
#define SLEEP_MQTT_PUBLIC_TIME 60 //s
#define MQTT_PUBLIC_TIME 5 //s

/* Exported functions prototypes ---------------------------------------------*/

/* Private defines -----------------------------------------------------------*/


#ifdef __cplusplus
}
#endif

#endif /* __CONFIG_H */